/**
 * Created by Administrator on 2017/10/22.
 */
function Login_sys(){
        console.log("flag");
        if($("#cname").val() ==""){
        alert("用户名不能为空，请输入用户名后继续！");
        $("#cname").focus();
        return;
    }
    if($("#cpwd").val() == ""){
        alert("用户密码为空，请输入用户密码后继续！");
        $("#cpwd").focus();
        return;
    }

    var fdata = $("#login_form").serialize();
    $.param(fdata);
    //console.log(fdata);
    $.ajax({
        url:"../../account/login",
        type:"GET",
        data:fdata,
       // processData:false,
        contentType:"application/x-www-form-urlencoded; charset=utf-8",
        dataType:"json",
        success:function(result){

            //var obj=eval("("+result+")");
            //或者$.parsejson(data);
           if(result.code==0){
                alert(result.message);
                location.href="./.././html/accountManage.html";
            }else if(result.code==1){
                alert(result.message);
            }
        }
    });
}
